// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StrategyExpoCellInventory.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.Forge
{
    #region Using Directives

    using Org.OpenTrader.Framework.Forge.Enums;
    using Org.OpenTrader.Framework.Forge.Events;

    #endregion

    /// <summary>
    /// The strategy expo cell.
    /// </summary>
    public class StrategyExpoCellInventory : StrategyExpoCell
    {
        #region Properties

        /// <summary>
        /// Type of the expo
        /// </summary>
        public override EExpoCellType ExpoCellType
        {
            get
            {
                return EExpoCellType.Inventory;
            }
        }

        /// <summary>
        /// Gets InventoryEventDelegate.
        /// </summary>
        public override InventoryEventDelegate InventoryEventDelegate
        {
            get
            {
                return this.OnInventory;
            }
        }

        /// <summary>
        /// Gets OrderEventDelegate.
        /// </summary>
        public override OrderEventDelegate OrderEventDelegate
        {
            get
            {
                return null;
            }
        }

        /// <summary>
        /// Gets RefPrice.
        /// </summary>
        public override double RefPrice
        {
            get
            {
                // return ExpoRefPriceRule.Standard(this.Instrument);
                return 0.0;
            }
        }

        #endregion

        #region Methods

        /// <summary>
        /// The on order.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="args">
        /// The args.
        /// </param>
        private void OnInventory(object sender, OrderEventArgs args)
        {
            //// Traded exposition only needs Executions to be updated
            // if (args is OrderEventArgs.Execution)
            // {
            // // The execution event args
            // var sargs = args as OrderEventArgs.Execution;
            // this.Add(sargs.Way, sargs.Quantity, sargs.Price);
            // }
        }

        #endregion
    }
}